﻿using System;
using System.Configuration.Abstractions;

namespace Sustainalytics.ClientDW.Synchronization.SyncESGData.AbstractClassesAndInterfaces
{
    public class BackOfficeAppSettings
    {
        public BackOfficeAppSettings(IAppSettings appSettings)
        {
            HBaseThriftServer = appSettings["HBaseThriftServer"];
            HBaseWaitRetryDuration = TimeSpan.FromSeconds(int.Parse((appSettings["HBaseWaitRetryDuration"])));
            HBaseRetryNumberOfTimes = int.Parse(appSettings["HBaseRetryNumberOfTimes"]);
            PhoenixServer = appSettings["PhoenixServerUrl"];
        }

        public string HBaseThriftServer { get; set; }        

        public TimeSpan HBaseWaitRetryDuration { get; set; }

        public int HBaseRetryNumberOfTimes { get; set; }

        public string PhoenixServer { get; set; }
    }
}